package com.ruoyi.chiwen.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.chiwen.mapper.TbAuditMapper;
import com.ruoyi.chiwen.domain.TbAudit;
import com.ruoyi.chiwen.service.ITbAuditService;

/**
 * 审核Service业务层处理
 * 
 * @author chiwen
 * @date 2021-06-14
 */
@Service
public class TbAuditServiceImpl implements ITbAuditService 
{
    @Autowired
    private TbAuditMapper tbAuditMapper;

    /**
     * 查询审核
     * 
     * @param aId 审核ID
     * @return 审核
     */
    @Override
    public TbAudit selectTbAuditById(Long aId)
    {
        return tbAuditMapper.selectTbAuditById(aId);
    }

    /**
     * 查询审核列表
     * 
     * @param tbAudit 审核
     * @return 审核
     */
    @Override
    public List<TbAudit> selectTbAuditList(TbAudit tbAudit)
    {
        return tbAuditMapper.selectTbAuditList(tbAudit);
    }

    /**
     * 新增审核
     * 
     * @param tbAudit 审核
     * @return 结果
     */
    @Override
    public int insertTbAudit(TbAudit tbAudit)
    {
        tbAudit.setCreateTime(DateUtils.getNowDate());
        return tbAuditMapper.insertTbAudit(tbAudit);
    }

    /**
     * 修改审核
     * 
     * @param tbAudit 审核
     * @return 结果
     */
    @Override
    public int updateTbAudit(TbAudit tbAudit)
    {
        tbAudit.setUpdateTime(DateUtils.getNowDate());
        return tbAuditMapper.updateTbAudit(tbAudit);
    }

    /**
     * 批量删除审核
     * 
     * @param aIds 需要删除的审核ID
     * @return 结果
     */
    @Override
    public int deleteTbAuditByIds(Long[] aIds)
    {
        return tbAuditMapper.deleteTbAuditByIds(aIds);
    }

    /**
     * 删除审核信息
     * 
     * @param aId 审核ID
     * @return 结果
     */
    @Override
    public int deleteTbAuditById(Long aId)
    {
        return tbAuditMapper.deleteTbAuditById(aId);
    }
}
